﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace SilverChart.UnitTest {
    public class TestHelper {
        public static void AreSameBrush(Brush expected, Brush actual) {
            AreSameBrush(expected, actual, "");
        }

        public static void AreSameBrush(Brush expected, Brush actual, String message) {
            Assert.AreSame(expected.GetType(), actual.GetType(), message + ": Type");
            if (actual is SolidColorBrush) {
                Assert.AreEqual<Color>((expected as SolidColorBrush).Color, (actual as SolidColorBrush).Color, 
                    message + ": Color");
                return;
            }
            Assert.Fail(message + ": Unknow Brush Type [" + actual.GetType() + "]");
        }
    }
}
